﻿using System;

namespace ICommonLibrary.Cocurrent {

    public interface IAsyncCallback<T> {

        /// <summary>
        /// Called when an asynchronous call fails to complete normally.
        /// </summary>
        /// <param name="error"></param>
        void OnFailure(Exception error);

        /// <summary>
        /// Called when an asynchronous call completes successfully.
        /// </summary>
        /// <param name="result"></param>
        void OnSuccess(T result);

    }
}